import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_audio_fft/flutter_audio_fft.dart';
import 'package:flutter_audio_fft/flutter_audio_fft_platform_interface.dart';
import 'package:flutter_audio_fft/flutter_audio_fft_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterAudioFftPlatform
    with MockPlatformInterfaceMixin
    implements FlutterAudioFftPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterAudioFftPlatform initialPlatform = FlutterAudioFftPlatform.instance;

  test('$MethodChannelFlutterAudioFft is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterAudioFft>());
  });

  test('getPlatformVersion', () async {
    FlutterAudioFft flutterAudioFftPlugin = FlutterAudioFft();
    MockFlutterAudioFftPlatform fakePlatform = MockFlutterAudioFftPlatform();
    FlutterAudioFftPlatform.instance = fakePlatform;

    expect(await flutterAudioFftPlugin.getPlatformVersion(), '42');
  });
}
